var auth = "2f3d057c03edcc54f3d34a627db3be67"
var url = "http://192.168.209.33/sailun/api_jsonrpc.php"

var test1111

function llGetNow(itemid) {
	var json_data = JSON.stringify({
		"jsonrpc": "2.0",
		"method": "item.get",
		"params": {
			"output": "extend",
			"sortfield": "name",
			"itemids": itemid
		},
		"auth": auth,
		"id": 1
	});
	$.ajax({
		url: url,
		method: 'post',
		async: false,
		dataType: 'json',
		headers: {
			"Content-Type": "application/json"
		},
		data: json_data,
		success: function(data) {
			console.log(data.result);
			alert_array = data.result;
			for (i in alert_array) {
				test1111 = alert_array[i].lastvalue / 1048576;
				// console.log(alert_array[i].lastvalue);
				
			}
			// alert(data.result)
			// 请求成功后的结果放在data里面
		}
	});
	return test1111;
}

// llGetNow();